module lang.d.sts.expressions.dindexexpression;

import lang.d.sts.expressions.dexpression;
import lang.d.sts.expressions.dcommaexpression;
import lang.d.visitors.dvisitor;

class DIndexExpression: DExpression {
    private DExpression myPrimaryExpression;
    private DCommaExpression myArguments;

    public this(DExpression primaryExpression, DCommaExpression arguments) {
        myPrimaryExpression = primaryExpression;
        primaryExpression.setParent(this);
        myArguments = arguments;
        arguments.setParent(this);
    }

    public DExpression getPrimaryExpression() {
        return myPrimaryExpression;
    }

    public DCommaExpression getArguments() {
        return myArguments;
    }

    override public void accept(DVisitor visitor) {
        visitor.visitIndexExpression(this);
    }
}

